import type { RouteRecordRaw } from "vue-router";

const articleRouter: RouteRecordRaw[] = [
  {
    path: "/article",
    name: "Article",
    component: () => import("@/layout/index.vue"),
    redirect: "/article/list",
    meta: {
      icon: "ri:article-line",
      title: "文章管理",
      rank: 4,
      roles: ["admin", "editor"]
    },
    children: [
      {
        path: "/article/category",
        name: "ArticleCategory",
        component: () => import("@/views/mall/article/category/index.vue"),
        meta: {
          title: "文章分类",
          roles: ["admin", "editor"]
        }
      },
      {
        path: "/article/list",
        name: "ArticleList",
        component: () => import("@/views/mall/article/index.vue"),
        meta: {
          title: "文章列表",
          roles: ["admin", "editor"]
        }
      }
    ]
  }
];

export default articleRouter;
